﻿@model MvcApplication4.Models.tb_Funcionario

@{
    ViewBag.Title = "Cadastrar Funcionário";
}

<h2>Cadastrar Funcionário</h2>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)

    <fieldset>
        <legend>Cadastro Funcionário</legend>

      @*  <div class="editor-label">
            @Html.LabelFor(model => model.ID_Funcionario)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.ID_Funcionario)
            @Html.ValidationMessageFor(model => model.ID_Funcionario)
        </div> *@

        <div class="editor-label">
            @Html.LabelFor(model => model.ID_UBS, "UBS")
        </div>
        <div class="editor-field">
            @Html.DropDownList("ID_UBS", String.Empty)
            @Html.ValidationMessageFor(model => model.ID_UBS, "Selecione a UBS")
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Nome_Funcionario, "Nome Funcionário")
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Nome_Funcionario)
            @Html.ValidationMessageFor(model => model.Nome_Funcionario, "Selecione o Funcionário")
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.CPF, "CPF (Somente números)")
        </div>
        <div class="editor-field">
           @* @Html.EditorFor(model => model.CPF)*@
            @{ Html.Syncfusion().MaskEditTextBoxFor(model=>model.CPF).Mask("999.999.999-99").Render(); }
            @Html.ValidationMessageFor(model => model.CPF)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Login_Fun, "Login")
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Login_Fun)
            @Html.ValidationMessageFor(model => model.Login_Fun)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Senha, "Senha")
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Senha)
            @Html.ValidationMessageFor(model => model.Senha, "Digite a senha")
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Telefone, "Telefone")
        </div>
        <div class="editor-field">
            @*@Html.EditorFor(model => model.Telefone)*@
            @{ Html.Syncfusion().MaskEditTextBoxFor(model=>model.Telefone).Mask("(99)99999-9999").Render(); }
            @Html.ValidationMessageFor(model => model.Telefone, "Digite o telefone")
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Email, "Email (Opcional)")
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Email)
            @Html.ValidationMessageFor(model => model.Email)
        </div>

        <p>
            <input type="submit" value="Cadastrar" />
        </p>
    </fieldset>
}

<div>
    @Html.ActionLink("Voltar", "Index")
</div>

@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
}
